const {imgUrl} = getApp().globalData

import {knowledgeApi} from '@/utils/request/api/knowledge'

Page({
  data: {
    imgUrl: imgUrl + 'knowledge/',
    videoList: [{}, {}, {}],
    pageQuery: {
      index: 1,
      pageSize: 20
    },
  },
  onLoad(options) {
  },
  onReady() {
  },
  onShow() {
    this.getMyClass()
  },
  onHide() {
  },
  onUnload() {
  },
  onShareAppMessage() {
    return {
      title: '',
    };
  },
  async getMyClass(){
    let params = {
      page: this.data.pageQuery.index,
      page_size: this.data.pageQuery.pageSize,
      keyword: '',
      study_status:'',
    }
    let res = await knowledgeApi.userUrl('list',params)
    if(res.err_code == 0){
      this.setData({
        videoList:res.data.list
      })
    }else{
      this.setData({
        videoList:[]
      })
    }
  }


});